package com.vf.user.domain.VO;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@ApiModel(value = "微信小程序通过code获取手机号完成注册")
public class UserAppletRegisterByPhoneVO {

    @Pattern(regexp = "^(((ht|f)tps?):\\/\\/)?([^!@#$%^&*?.\\s-]([^!@#$%^&*?.\\s]{0,63}[^!@#$%^&*?.\\s])?\\.)+[a-z]{2,6}\\/?", message = "头像格式不正确")
    @ApiModelProperty(value = "头像")
    private String avatar;

    @NotNull(message = "昵称不能为空")
    @ApiModelProperty(value = "昵称")
    private String nickName;

    @NotNull(message = "授权码不能为空")
    @ApiModelProperty(value = "微信小程序用于获取手机号的code")
    private String code;
}
